import 'package:flutterproject/generated/json/base/json_field.dart';
import 'package:flutterproject/generated/json/quota_bean.g.dart';
import 'dart:convert';

@JsonSerializable()
class QuotaBean {

	List<QuotaList>? list;
  
  QuotaBean();

  factory QuotaBean.fromJson(Map<String, dynamic> json) => $QuotaBeanFromJson(json);

  Map<String, dynamic> toJson() => $QuotaBeanToJson(this);

  QuotaBean copyWith({List<QuotaList>? list}) {
      return QuotaBean()..list= list ?? this.list;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class QuotaList {

	String? symbol;
	String? code;
	double? latestPrice;
	double? changeRate;
  
  QuotaList();

  factory QuotaList.fromJson(Map<String, dynamic> json) => $QuotaListFromJson(json);

  Map<String, dynamic> toJson() => $QuotaListToJson(this);

  QuotaList copyWith({String? symbol, String? code, double? latestPrice, double? changeRate}) {
      return QuotaList()..symbol= symbol ?? this.symbol
			..code= code ?? this.code
			..latestPrice= latestPrice ?? this.latestPrice
			..changeRate= changeRate ?? this.changeRate;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}